<template>
<div>
   <el-form-item label="">
    <el-select v-model="value" placeholder="请选择保险种类" @change="choose">
      <el-option
        v-for="item in pageData.data"
        :key="item._id"
        :label="item.categoryName"
        :value="item._id"
      ></el-option>
    </el-select>
    </el-form-item>

</div>
 

  
</template>

<script>
import { createNamespacedHelpers } from "vuex";
const { mapState, mapActions } = createNamespacedHelpers("productcategory");

export default {
  data() {
    return {
      value:"",
    };
  },

  computed: {
    ...mapState(["pageData"]),
  },
  created() {
    this.showCategorys();
    // this.showCategorys();
  },

  methods: {
    ...mapActions(["showCategorys", "delectone", "getcategoryid"]),
    choose(){
        this.$emit("choose",this.value)
    }
  },
};
</script>